package com.hejia.alauda.entity;

import java.math.BigDecimal;

public enum Award {
	
	THANKS("THANKS", "谢谢参与", "啊哦!离奖品还差一点,明天再来!", new BigDecimal("0")), 
	
	/*虚拟物品*/
	CREDIT_2000("CREDIT_2000", "2000积分","运气不错，2000积分到手啦", new BigDecimal("2")), 
	CREDIT_10000("CREDIT_10000", "10000积分", "恭喜获得10000积分,积分商城走起", new BigDecimal("10")), 
	PHONE_CHARGE("PHONE_CHARGE", "20元加油流量", "Good！成功获得20元加油流量", new BigDecimal("20")),
	/*实物奖品*/
	IPAD_MINI("IPAD_MINI","iPad mini","人品爆发！Pad mini到手啦",new BigDecimal("3000")),
	DOGE_CUSHION("DOGE_CUSHION","doge抱枕","人品不错！doge抱枕带回家",new BigDecimal("120")),
	AIR_CLEANER("AIR_CLEANER", "负离子空气净化器", "空气净化器，赠您一个私人负离子氧吧", new BigDecimal("20")), 
	SELFIESTICK("SELFIESTICK", "手机通用自拍杆","恭喜抽到手机自拍杆，人品杠杠的", new BigDecimal("50")), 
	POWER_BANK("POWER_BANK","充电宝", "萌萌哒充电宝，请笑纳~", new BigDecimal("100")),
	
	BRACELET("BRACELET","小米手环", "", new BigDecimal("0")),
	CHARGE_PAL("CHARGE_PAL","小米移动电源", "", new BigDecimal("0")),
	WASU_VIP_1("WASU_VIP_1","1个月华数VIP会员", "", new BigDecimal("0")),
	WASU_VIP_12("WASU_VIP_12","12个月华数VIP会员", "", new BigDecimal("100")),
	
	BOSMA_ASTRONOMICAL_TELESCOPE("BOSMA_ASTRONOMICAL_TELESCOPE","博冠天文望远镜","",new BigDecimal("1499")),
	GIANT_CHILDREN_BICYCLE("GIANT_CHILDREN_BICYCLE","捷安特儿童自行车","",new BigDecimal("599")),
	LEGO_BLOCKS("LEGO_BLOCKS","乐高积木","",new BigDecimal("299")),
	LED_LAMP("LED_LAMP","好视力LED台灯","",new BigDecimal("169")),
	JDE_CARD("JDE_CARD","京东E卡50元","",new BigDecimal("50")),
	
	JIAYUAN_STAMP_5("JIAYUAN_STAMP_5","世纪佳缘邮票5张", "看信邮票5张",new BigDecimal("10")),
	JIAYUAN_FREE_READ_LETTER_1("JIAYUAN_FREE_READ_LETTER_1","看信包月1个月", "看信包月1个月",new BigDecimal("0")),
	JIAYUAN_VIP_MONTH_1("JIAYUAN_VIP_MONTH_1","看信包月3个月", "看信包月3个月",new BigDecimal("0")),
	JIAYUAN_VIP_12("JIAYUAN_VIP_12","钻石会员12个月", "钻石会员12个月",new BigDecimal("0")),
	JIAYUAN_VIP_YEAR_1("JIAYUAN_VIP_YEAR_1","钻石会员1个月", "钻石会员1个月",new BigDecimal("0")),
	
	JIAYUAN_TOP_UP_CARD("JIAYUAN_TOP_UP_CARD","手机充值卡30元", "手机充值卡30元",new BigDecimal("30")),
	JIAYUAN_MOVIE_TICKET("JIAYUAN_MOVIE_TICKET","电影票", "电影票",new BigDecimal("60")),
	JIAYUAN_DOVE_CHOCOLATE("JIAYUAN_DOVE_CHOCOLATE","德芙巧克力+钻石会员1个月", "德芙巧克力",new BigDecimal("50")),
	JIAYUAN_JD_E_CARD("JIAYUAN_JD_E_CARD","京东E卡100元", "京东E卡100元+看信包月3个月",new BigDecimal("100")),
	JIAYUAN_TROLLEYCAE("JIAYUAN_TROLLEYCAE","旅行箱", "旅行箱+钻石会员12个月",new BigDecimal("299")),
	
	YOUKU_MONTH_CARD_FOR_SHARE("YOUKU_MONTH_CARD_FOR_SHARE","优酷月卡（分享）","",new BigDecimal("20")),
	YOUKU_MONTH_CARD_HEJIA("YOUKU_MONTH_CARD_HEJIA","优酷月卡（合家送）","",new BigDecimal("20")),
	YOUKU_SEASON_CARD_HEJIA("YOUKU_SEASON_CARD_HEJIA","优酷季卡（合家送）","",new BigDecimal("60")),
	YOUKU_MONTH_CARD("YOUKU_MONTH_CARD","优酷月卡","",new BigDecimal("20")),
	YOUKU_SEASON_CARD("YOUKU_SEASON_CARD","优酷季卡","",new BigDecimal("60"));
	
	private String code;

	private String name;

	private String description;

	private BigDecimal price;
	
	private int stock;

	private Award(String code, String name, String description, BigDecimal price) {
		this.code = code;
		this.name = name;
		this.description = description;
		this.price = price;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public int getStock() {
		return stock;
	}

	public void setStock(int stock) {
		this.stock = stock;
	}

	public static Award getAwardFromCode(String code) {
		Award[] awards = values();
		for (Award award : awards) {
			if (award.getCode().equals(code)) {
				return award;
			}
		}
		return null;
	}
}
